package com.ruoyi.partybuilding.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.partybuilding.mapper.MeetingReceiptMapper;
import com.ruoyi.partybuilding.domain.MeetingReceipt;
import com.ruoyi.partybuilding.service.IMeetingReceiptService;

/**
 * 会议回执Service业务层处理
 * 
 * @author he-liangliang@outlook.com
 * @date 2024-11-27
 */
@Service
public class MeetingReceiptServiceImpl implements IMeetingReceiptService 
{
    @Autowired
    private MeetingReceiptMapper meetingReceiptMapper;

    /**
     * 查询会议回执
     * 
     * @param id 会议回执主键
     * @return 会议回执
     */
    @Override
    public MeetingReceipt selectMeetingReceiptById(Long id)
    {
        return meetingReceiptMapper.selectMeetingReceiptById(id);
    }

    /**
     * 查询会议回执列表
     * 
     * @param meetingReceipt 会议回执
     * @return 会议回执
     */
    @Override
    public List<MeetingReceipt> selectMeetingReceiptList(MeetingReceipt meetingReceipt)
    {
        return meetingReceiptMapper.selectMeetingReceiptList(meetingReceipt);
    }

    /**
     * 新增会议回执
     * 
     * @param meetingReceipt 会议回执
     * @return 结果
     */
    @Override
    public int insertMeetingReceipt(MeetingReceipt meetingReceipt)
    {
        meetingReceipt.setCreateTime(DateUtils.getNowDate());
        return meetingReceiptMapper.insertMeetingReceipt(meetingReceipt);
    }

    /**
     * 修改会议回执
     * 
     * @param meetingReceipt 会议回执
     * @return 结果
     */
    @Override
    public int updateMeetingReceipt(MeetingReceipt meetingReceipt)
    {
        meetingReceipt.setUpdateTime(DateUtils.getNowDate());
        return meetingReceiptMapper.updateMeetingReceipt(meetingReceipt);
    }

    /**
     * 批量删除会议回执
     * 
     * @param ids 需要删除的会议回执主键
     * @return 结果
     */
    @Override
    public int deleteMeetingReceiptByIds(Long[] ids)
    {
        return meetingReceiptMapper.deleteMeetingReceiptByIds(ids);
    }

    /**
     * 删除会议回执信息
     * 
     * @param id 会议回执主键
     * @return 结果
     */
    @Override
    public int deleteMeetingReceiptById(Long id)
    {
        return meetingReceiptMapper.deleteMeetingReceiptById(id);
    }
}
